<template>
	<view>
		<view class="" style="background-color: #F3F4F5;height: 100vh;width: 100%;">
			<view class="" style="width: 100%;height: auto;background-color: #fff;">
				<view class="account">
					<view class="zye">总余额（元）</view>
					<view class="je">{{myaccount.total_account}}</view>
					<view class="cz" @click="$linkTo('./Recharge')">充值</view>
				</view>
				<view class="scend flex_r_between">
					<view class="itemmk" @click="$linkTo('/pagesA/Withdrawal')">
						<view class="nb">{{myaccount.account}}</view>
						<view class="nb1">余额(元)</view>
					</view>
					<view class="itemmk">
						<view class="nb">{{myaccount.freeze_account}}</view>
						<view class="nb1">冻结余额(元)</view>
					</view>
					<view class="itemmk">
						<view class="nb">{{myaccount.deposit}}</view>
						<view class="nb1">保证金(元)</view>
					</view>
				</view>
			</view>
			<view class="list">
				<view class="item flex_r_between" @click="$linkTo('./Capital_details')">
					<view>资金明细</view>
					<view>
						<image style="width: 30rpx;height: 28rpx;" src="../../static/direction_right_gray.png" mode=""></image>
					</view>
				</view>
				<view class="item flex_r_between" @click="$linkTo('./My_coupons')">
					<view>我的优惠券</view>
					<view>
						<image style="width: 30rpx;height: 28rpx;" src="../../static/direction_right_gray.png" mode=""></image>
					</view>
				</view>
				<view class="item flex_r_between" @click="$linkTo('./My_points')">
					<view>我的积分</view>
					<view>
						<image style="width: 30rpx;height: 28rpx;" src="../../static/direction_right_gray.png" mode=""></image>
					</view>
				</view>
				<!-- <view class="item flex_r_between" style="border: none;">
					<view>保证金转入余额</view>
					<view>
						<image style="width: 30rpx;height: 28rpx;" src="../../static/direction_right_gray.png" mode=""></image>
					</view>
				</view> -->
			</view>
		</view>
		<uni-popup ref="popup">
			<view class="log">
				<view class="tip">
					温馨提示
				</view>
				<view class="center">
					为了您的账户安全，请进行实名认证！请确保是您本人，后续提现只能提取至该人支付宝！
				</view>
				<view class="flex_r_between">
					<view class="leftBtn" @click="closePopup">以后再说</view>
					<view class="rightBtn" @click="$linkTo('./identity_authentication')">立即认证</view>
				</view>
			</view>
		</uni-popup>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				myaccount:null,
			};
		},
		onShow() {
			this.$request('/app/user/getMyAccount','post',{
				access_token:uni.getStorageSync('access_token').replace(/^\"|\"$/g,''),
			}).then(res=>{
				this.myaccount=res.content
			})
			this.$request('/app/user/getuserinfo','post',{
				access_token:uni.getStorageSync('access_token').replace(/^\"|\"$/g,''),
			}).then(res=>{
				if(res.content.certification_status=='0'){
					this.openPopup()
				}
			})
		},
		methods:{
			openPopup(){
				this.$refs.popup.open()
			},
			closePopup(){
				this.$refs.popup.close()
			}
		}
	}
</script>

<style lang="scss" scoped>
	@import url("@/static/css/flex.css");
	.log{
		width: 560rpx;
		height: 464rpx;
		background: #FFFFFF;
		border-radius: 4rpx;
		padding: 60rpx;
		box-sizing: border-box;
		text-align: center;
		.tip{
			font-size: 34rpx;
			font-family: PingFangSC-Medium, PingFang SC;
			font-weight: 500;
			color: #000000;
			
		}
		.center{
			font-size: 30rpx;
			font-family: PingFangSC-Regular, PingFang SC;
			font-weight: 400;
			color: #323232;
			text-align: left;
			margin: 40rpx 0;
		}
		.leftBtn{
			width: 200rpx;
			height: 72rpx;
			border-radius: 36rpx;
			border: 2rpx solid #777777;
			line-height: 72rpx;
		}
		.rightBtn{
			width: 200rpx;
			height: 72rpx;
			border-radius: 36rpx;
			background: #DB1B22;
			border-radius: 32rpx;
line-height: 72rpx;
color: #fff;
		}
	}
	.list{
		margin-top: 20rpx;
		.item{
			width: 100%;
			height: 88rpx;
			background: #FFFFFF;
			border-bottom: 1px solid #DDDDDD;
			padding: 0 34rpx 0 40rpx;
			box-sizing: border-box;
			font-size: 28rpx;
			font-family: PingFangSC-Regular, PingFang SC;
			font-weight: 400;
			color: #111111;

		}
	}
	.scend{
		.itemmk{
			height: 50%;
			width: 33%;
			text-align: center;
			padding: 28rpx 0;
			.nb{
				font-size: 32rpx;
				font-family: PingFangSC-Medium, PingFang SC;
				font-weight: 500;
				color: #111111;
			}
			.nb1{
				font-size: 22rpx;
				font-family: PingFangSC-Regular, PingFang SC;
				font-weight: 400;
				color: #9DA5A8;
	
			}
		}
	}
	.account{
		height: 392rpx;
		width: 670rpx;
		margin:56rpx auto;
		background-image: url(../../static/spokesmanImg/bg_money@2x.png);
		background-size: 100% 100%;
		background-repeat: no-repeat;
		text-align: center;
		.zye{
			font-size: 28rpx;
			font-family: PingFangSC-Regular, PingFang SC;
			font-weight: 400;
			color: #111111;
			padding-top: 46rpx;
		}
		.je{
			font-size: 100rpx;
			font-family: PingFangSC-Medium, PingFang SC;
			font-weight: 500;
			color: #111111;
			margin: 8rpx auto 26rpx;
		}
		.cz{
			width: 128rpx;
			height: 52rpx;
			background: rgba(0, 0, 0, 0.69);
			border-radius: 26rpx;
			line-height: 52rpx;
			margin: auto;
			font-size: 28rpx;
			font-family: PingFangSC-Regular, PingFang SC;
			font-weight: 400;
			color: #FFB305;

		}
	}
</style>
